Sample adaptive offset (SAO) was introduced for the next generation video coding standard called high efficiency video coding (HEVC). Sample adaptive offset is applied after deblocking filtering process, but before adaptive loop filtering (ALF) as shown in FIG. 1. In sample adaptive offset tool in HEVC and other extensions, picture, slice and LCU boundary pixels may not be filtered for different reasons such as to eliminate line buffer requirements, remove dependencies between slices etc. This leads to visual artifacts and quality/bit-rate degradation. This disclosure presents techniques for SAO processing of picture, slice, and LCU boundary pixels to mitigate visual artifacts and reduce quality/bit-rate degradation.
SAO involves adding an offset directly to the reconstructed pixel from the video decoder loop in FIG. 1. The offset value applied to each pixel depends on the local characteristics surrounding that pixel. There are two kinds of offsets, namely band offset (BO) and edge offset (EO). The band offset classifies pixels by intensity interval of the reconstructed pixel, while edge offset classifies pixels based on edge direction and structure. FIG. 2. is an embodiment depicting a band Offset (BO) group classification. For band offset, the pixel is classified into one of 32 band and 4 offsets are provided that corresponds to 4 consecutive bands, of which the starting band is signaled.